<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String showTitle = request.getParameter("showTitle");
%>
<style>
.sy_body_pic{
	width: 330px;
}
</style>
<div class="sys-portlet">
	<%if(showTitle != null && showTitle.equals("1")){ %>
	<div class="sys-title1 sys-title-bg1">
		<span class="sys-title-txt1 sys-title-txtbg sys-title-color1">
			<img class="sys-title-ico" src="<%=path %>/res/themes/${sessionScope.SESSION_STREET_THEME.thStyle}/imgs/ico_news.gif" />
			<s:property value="#parameters.title"/>
		</span>
		<div class="sys-more sys-more-ico1" onclick="location.href='<%=path %>/<s:property value="domain"/>/msg/list/<s:property value="msgType"/>'"><div></div></div>
	</div>
	<%} %>
	<table class="portlet-body" width="100%" cellspacing="0" cellpadding="0">
		<tr>
			<td class="sy_body_pic">
				<script type="text/javascript">
					var pics  = "";
					var links = "";
					var texts = "";
					<s:iterator var="msg" value="picMsgList">
						pics  += '<%=path %><s:property value="#msg.msgCover"/>|';
						links += '<%=path %>/<s:property value="domain"/>/msg/item/<s:property value="#msg.msgType"/>/<s:property value="#msg.msgId"/>|';
						texts += '<s:property value="#msg.msgTitle"/>|';
					</s:iterator>
	
					if(!pics) pics = "<%=path %>/res/imgs/default_pic.jpg";
					if(!links) links = "";
					if(!texts) texts = "";

					if(pics.lastIndexOf("|") > 0) pics = pics.substring(0, pics.lastIndexOf("|"));
					if(links.lastIndexOf("|") > 0) links = links.substring(0, links.lastIndexOf("|"));
					if(texts.lastIndexOf("|") > 0) texts = texts.substring(0, texts.lastIndexOf("|"));
				
					var focus_width=330;
					var focus_height=156;
					var text_height=20;
					var swf_height = focus_height+text_height; 
			 
					document.write('<object type="application/x-shockwave-flash" data="<%=path %>/res/imgs/slideshow.swf" ');
					document.write('width="' + focus_width + '" height="' + swf_height + '">');
					document.write('<param name="movie" value="<%=path %>/res/imgs/slideshow.swf" />');
					document.write('<param name="allowScriptAcess" value="sameDomain" />');
					document.write('<param name="quality" value="best" />');
					document.write('<param name="bgcolor" value="#E5ECF4" />');
					document.write('<param name="scale" value="noScale" />');
					document.write('<param name="menu" value="false">');
					document.write('<param name="wmode" value="opaque" />');
					document.write('<param name="FlashVars" value="playerMode=embedded&pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" />');
					document.write('</object>');
			 	</script>
			</td>
			<td width="10"></td>
			<td valign="top">
				<table width="100%" cellspacing="0" cellpadding="0">
					<s:iterator var="msg" value="txtMsgList">
						<tr>
							<td>
								<a target="_blank" href="<%=path %>/<s:property value="domain"/>/msg/item/<s:property value="#msg.msgType"/>/<s:property value="#msg.msgId"/>">
									<s:property value="#msg.msgTitle"/>
								</a>
							</td>
							<td width="70px"><s:property value="#msg.publishTime"/></td>
						</tr>
					</s:iterator>
				</table>
			</td>
		</tr>
	</table>
</div>